<template>
    <div v-if="problem">
        info:
        {{ problem }}
        <el-button @click="handleClick">Hello</el-button>
    </div>
</template>

<script setup>
import { onBeforeMount, onMounted, ref } from "vue"

const problem = ref(null);
const GetProblem = async () => {
    const {data : problem_info} = await useFetch("https://api.starrycoding.com/Problem/GetProblemDetail?id=1", {
        method:"GET",
    })
    console.log(problem_info);
    problem.value = problem_info.value.data;
}
await GetProblem();

import { ElMessage } from "element-plus";

const handleClick = () => {
    ElMessage.success('666')
}

</script>